import axios from '../../http/axios'
export default {
  namespaced: true,
  state: {
    user: {}
  },
  mutations: {
    setUser(state, data) {
      state.user = data.data
    }
  },
  actions: {
    async getUserInfo(context) {
      const {data} = await axios({
        url:'/users/getUserInfo',
      })
      context.commit('setUser', data)
    },
  }
}